<?php 
for($r = $offset; $r < ($offset+$limit); $r++)
{
	$data = $homepage_array[$r];
	$content_array = $data['content'];

	//if its IE7 then force the content_type to be small 
	if($browser_array['version'] == "7.0" && $browser_array['short_name'] == "MSIE")
	{
		//force the content type to be worksmall for all work type items
		switch($data['content_type'])
		{
			case "workbigsocial":
			case "workbig":
			case "worksmallimg":
				$data['content_type'] = "worksmall";
			break;
		}
	}

	switch($data['content_type'])
	{
		case "workbigsocial":
		case "workbig":
			$url = "/work/campaign/".clean_url($content_array[0]['client_title'])."/".$content_array[0]['campaign_url_slug']."/".$content_array[0]['url_slug']."";
		?>
			<a href="<?php echo $url?>" class="tile-item">
				<div class="item work large featured">
					<div class="pic">
						<img src="<?php echo ASSET_STORE_CAMPAIGNS_WORK_ABSOLUTE.$content_array[0]['image']?>" />
					</div>
					<div class="info">
						<?php echo $content_array[0]['client_title']?><br/>
						<strong><?php echo $content_array[0]['title']?></strong>
					</div>
				</div>
			</a>
		<?php
		break;
		case "worksmall":
		case "worksmallimg":
			$url = "/work/campaign/".clean_url($content_array[0]['client_title'])."/".$content_array[0]['campaign_url_slug']."/".$content_array[0]['url_slug']."";
			
			$image_info_array = pathinfo($content_array[0]['image']);
			$image_path = ASSET_STORE_CAMPAIGNS_WORK_ABSOLUTE.$image_info_array['filename']."-small.".$image_info_array['extension'];
		?>
			<a href="<?php echo $url?>" class="tile-item">
				<div class="item work single featured">
					<div class="pic">
						<img src="<?php echo $image_path?>" />
					</div>
					<div class="info">
						<?php echo $content_array[0]['client_title']?><br/>
						<strong><?php echo $content_array[0]['title']?></strong>
					</div>
				</div>
			</a>
		<?php
		break;
	}
	$i++;
}
?>